using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;

public class Gateway : MonoBehaviour
{


    [SerializeField] private Transform _tp;


    private void OnTriggerEnter2D(Collider2D collision)
    {

        var actor = collision.GetComponent<Actor>();
        var stone = collision.GetComponent<Stone>();
        if (actor) 
        {
            actor.transform.position = new Vector3(_tp.position.x,actor.transform.position.y,0);   
        }
        else if (stone) 
        {
            stone.transform.position = new Vector3(_tp.position.x, stone.transform.position.y, 0);
        }
    }
 
}
